package com.hxk.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * springboot异常处理方式四
 * 使用配置 SimpleMappingExceptionResolver类实现
 * 确定不能返回异常信息
 * @author Cactus
 */
@Controller
public class DemoController3 {

	@RequestMapping("/ex1")
	public String ex1() {
		int[] num = new int[2];
		System.out.println(num[2]);
		return "index";
	}
	
	@RequestMapping("/ex2")
	public String ex2() {
		String str = "aaa";
		int a = Integer.parseInt(str);
		return "index";
	}
}
